package Day_06;

import java.util.Random;

public class StandardOneDemo {
    public static void main(String[] args) {
        say();
        say("Tom");
        say("Jerry",25);
        System.out.println("Sum: "+sum(10,20));
        int[] arr = generateArray(10);
        for (int i = 0; i < arr.length; i++) {
            System.out.print(arr[i]+"\t");
        }
    }

    public static void say(){
        System.out.println("Hello, I'm cjh ,24 years old, nice to meet you!");
    }

    public static void say(String name){
        System.out.println("Hello, I'm "+name+" ,24 years old, nice to meet you!");
    }

    public static void say(String name ,int age){
        System.out.println("Hello, I'm "+name+" ,"+age+" years old, nice to meet you!");
    }

    public static int sum(int num1, int num2){
        int n = num1 + num2;
        return n;
    }

    public static int[] generateArray(int n){
        int[] a = new int[n];
        Random rand = new Random();
        for (int i = 0; i < a.length; i++) {
            a[i] = rand.nextInt(100);
        }
        return a;
    }


}
